//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#if _MSC_VER > 1000
#pragma once
#endif

#ifndef __oleidl_h__
#define __oleidl_h__

#ifdef __cplusplus
extern "C"{
#endif

/* Forward Declarations */

#ifndef __IOleAdviseHolder_FWD_DEFINED__
#define __IOleAdviseHolder_FWD_DEFINED__
typedef interface IOleAdviseHolder IOleAdviseHolder;
#endif     /* __IOleAdviseHolder_FWD_DEFINED__ */

#ifndef __IOleCache_FWD_DEFINED__
#define __IOleCache_FWD_DEFINED__
typedef interface IOleCache IOleCache;
#endif     /* __IOleCache_FWD_DEFINED__ */

#ifndef __IOleCache2_FWD_DEFINED__
#define __IOleCache2_FWD_DEFINED__
typedef interface IOleCache2 IOleCache2;
#endif     /* __IOleCache2_FWD_DEFINED__ */

#ifndef __IParseDisplayName_FWD_DEFINED__
#define __IParseDisplayName_FWD_DEFINED__
typedef interface IParseDisplayName IParseDisplayName;
#endif     /* __IParseDisplayName_FWD_DEFINED__ */

#ifndef __IOleContainer_FWD_DEFINED__
#define __IOleContainer_FWD_DEFINED__
typedef interface IOleContainer IOleContainer;
#endif     /* __IOleContainer_FWD_DEFINED__ */

#ifndef __IOleClientSite_FWD_DEFINED__
#define __IOleClientSite_FWD_DEFINED__
typedef interface IOleClientSite IOleClientSite;
#endif     /* __IOleClientSite_FWD_DEFINED__ */

#ifndef __IEnumOLEVERB_FWD_DEFINED__
#define __IEnumOLEVERB_FWD_DEFINED__
typedef interface IEnumOLEVERB IEnumOLEVERB;
#endif     /* __IEnumOLEVERB_FWD_DEFINED__ */

#ifndef __IOleObject_FWD_DEFINED__
#define __IOleObject_FWD_DEFINED__
typedef interface IOleObject IOleObject;
#endif     /* __IOleObject_FWD_DEFINED__ */

#ifndef __IOleWindow_FWD_DEFINED__
#define __IOleWindow_FWD_DEFINED__
typedef interface IOleWindow IOleWindow;
#endif     /* __IOleWindow_FWD_DEFINED__ */

#ifndef __IOleInPlaceUIWindow_FWD_DEFINED__
#define __IOleInPlaceUIWindow_FWD_DEFINED__
typedef interface IOleInPlaceUIWindow IOleInPlaceUIWindow;
#endif     /* __IOleInPlaceUIWindow_FWD_DEFINED__ */

#ifndef __IOleInPlaceActiveObject_FWD_DEFINED__
#define __IOleInPlaceActiveObject_FWD_DEFINED__
typedef interface IOleInPlaceActiveObject IOleInPlaceActiveObject;
#endif     /* __IOleInPlaceActiveObject_FWD_DEFINED__ */

#ifndef __IOleInPlaceFrame_FWD_DEFINED__
#define __IOleInPlaceFrame_FWD_DEFINED__
typedef interface IOleInPlaceFrame IOleInPlaceFrame;
#endif     /* __IOleInPlaceFrame_FWD_DEFINED__ */

#ifndef __IOleInPlaceObject_FWD_DEFINED__
#define __IOleInPlaceObject_FWD_DEFINED__
typedef interface IOleInPlaceObject IOleInPlaceObject;
#endif     /* __IOleInPlaceObject_FWD_DEFINED__ */

#ifndef __IOleInPlaceSite_FWD_DEFINED__
#define __IOleInPlaceSite_FWD_DEFINED__
typedef interface IOleInPlaceSite IOleInPlaceSite;
#endif     /* __IOleInPlaceSite_FWD_DEFINED__ */

#ifndef __IViewObject_FWD_DEFINED__
#define __IViewObject_FWD_DEFINED__
typedef interface IViewObject IViewObject;
#endif     /* __IViewObject_FWD_DEFINED__ */

#ifndef __IViewObject2_FWD_DEFINED__
#define __IViewObject2_FWD_DEFINED__
typedef interface IViewObject2 IViewObject2;
#endif     /* __IViewObject2_FWD_DEFINED__ */

/* header files for imported files */
#include "objidl.h"

/* interface __MIDL_itf_oleidl_0000 */
/* [local] */

#ifndef __IOleAdviseHolder_INTERFACE_DEFINED__
#define __IOleAdviseHolder_INTERFACE_DEFINED__

/* interface IOleAdviseHolder */
/* [uuid][object][local] */

typedef /* [unique] */ IOleAdviseHolder *POLEADVISEHOLDER;

EXTERN_C const IID IID_IOleAdviseHolder;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000111-0000-0000-C000-000000000046") IOleAdviseHolder : public IUnknown
{
public:
    virtual CARAPI Advise(
            /* [unique][in] */ IAdviseSink *pAdvise,
            /* [out] */ UInt32 *pdwConnection) = 0;

    virtual CARAPI Unadvise(
            /* [in] */ UInt32 dwConnection) = 0;

    virtual CARAPI EnumAdvise(
            /* [out] */ IEnumSTATDATA **ppenumAdvise) = 0;

    virtual CARAPI SendOnRename(
            /* [unique][in] */ IMoniker *pmk) = 0;

    virtual CARAPI SendOnSave( void) = 0;

    virtual CARAPI SendOnClose( void) = 0;
};

#else

typedef struct IOleAdviseHolderVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IOleAdviseHolder * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IOleAdviseHolder * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IOleAdviseHolder * This);

        ECode (CARAPICALLTYPE *Advise )(
            IOleAdviseHolder * This,
            /* [unique][in] */ IAdviseSink *pAdvise,
            /* [out] */ UInt32 *pdwConnection);

        ECode (CARAPICALLTYPE *Unadvise )(
            IOleAdviseHolder * This,
            /* [in] */ UInt32 dwConnection);

        ECode (CARAPICALLTYPE *EnumAdvise )(
            IOleAdviseHolder * This,
            /* [out] */ IEnumSTATDATA **ppenumAdvise);

        ECode (CARAPICALLTYPE *SendOnRename )(
            IOleAdviseHolder * This,
            /* [unique][in] */ IMoniker *pmk);

        ECode (CARAPICALLTYPE *SendOnSave )(
            IOleAdviseHolder * This);

        ECode (CARAPICALLTYPE *SendOnClose )(
            IOleAdviseHolder * This);

    } IOleAdviseHolderVtbl;

interface IOleAdviseHolder
    {
        CONST_VTBL struct IOleAdviseHolderVtbl *v;
    };

#ifdef COBJMACROS

#define IOleAdviseHolder_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IOleAdviseHolder_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IOleAdviseHolder_Release(This)    \
    (This)->v -> Release(This)

#define IOleAdviseHolder_Advise(This,pAdvise,pdwConnection)    \
    (This)->v -> Advise(This,pAdvise,pdwConnection)

#define IOleAdviseHolder_Unadvise(This,dwConnection)    \
    (This)->v -> Unadvise(This,dwConnection)

#define IOleAdviseHolder_EnumAdvise(This,ppenumAdvise)    \
    (This)->v -> EnumAdvise(This,ppenumAdvise)

#define IOleAdviseHolder_SendOnRename(This,pmk)    \
    (This)->v -> SendOnRename(This,pmk)

#define IOleAdviseHolder_SendOnSave(This)    \
    (This)->v -> SendOnSave(This)

#define IOleAdviseHolder_SendOnClose(This)    \
    (This)->v -> SendOnClose(This)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IOleAdviseHolder_INTERFACE_DEFINED__ */

#ifndef __IOleCache_INTERFACE_DEFINED__
#define __IOleCache_INTERFACE_DEFINED__

/* interface IOleCache */
/* [unique][uuid][object] */

typedef /* [unique] */ IOleCache *POLECACHE;

EXTERN_C const IID IID_IOleCache;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000011e-0000-0000-C000-000000000046") IOleCache : public IUnknown
{
public:
    virtual CARAPI Cache(
            /* [unique][in] */ FORMATETC *pformatetc,
            /* [in] */ UInt32 advf,
            /* [out] */ UInt32 *pdwConnection) = 0;

    virtual CARAPI Uncache(
            /* [in] */ UInt32 dwConnection) = 0;

    virtual CARAPI EnumCache(
            /* [out] */ IEnumSTATDATA **ppenumSTATDATA) = 0;

    virtual CARAPI InitCache(
            /* [unique][in] */ IDataObject *pDataObject) = 0;

    virtual /* [local] */ CARAPI SetData(
            /* [unique][in] */ FORMATETC *pformatetc,
            /* [unique][in] */ STGMEDIUM *pmedium,
            /* [in] */ Boolean fRelease) = 0;
};

#else

typedef struct IOleCacheVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IOleCache * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IOleCache * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IOleCache * This);

        ECode (CARAPICALLTYPE *Cache )(
            IOleCache * This,
            /* [unique][in] */ FORMATETC *pformatetc,
            /* [in] */ UInt32 advf,
            /* [out] */ UInt32 *pdwConnection);

        ECode (CARAPICALLTYPE *Uncache )(
            IOleCache * This,
            /* [in] */ UInt32 dwConnection);

        ECode (CARAPICALLTYPE *EnumCache )(
            IOleCache * This,
            /* [out] */ IEnumSTATDATA **ppenumSTATDATA);

        ECode (CARAPICALLTYPE *InitCache )(
            IOleCache * This,
            /* [unique][in] */ IDataObject *pDataObject);

        /* [local] */ ECode (CARAPICALLTYPE *SetData )(
            IOleCache * This,
            /* [unique][in] */ FORMATETC *pformatetc,
            /* [unique][in] */ STGMEDIUM *pmedium,
            /* [in] */ Boolean fRelease);

    } IOleCacheVtbl;

interface IOleCache
    {
        CONST_VTBL struct IOleCacheVtbl *v;
    };

#ifdef COBJMACROS

#define IOleCache_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IOleCache_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IOleCache_Release(This)    \
    (This)->v -> Release(This)

#define IOleCache_Cache(This,pformatetc,advf,pdwConnection)    \
    (This)->v -> Cache(This,pformatetc,advf,pdwConnection)

#define IOleCache_Uncache(This,dwConnection)    \
    (This)->v -> Uncache(This,dwConnection)

#define IOleCache_EnumCache(This,ppenumSTATDATA)    \
    (This)->v -> EnumCache(This,ppenumSTATDATA)

#define IOleCache_InitCache(This,pDataObject)    \
    (This)->v -> InitCache(This,pDataObject)

#define IOleCache_SetData(This,pformatetc,pmedium,fRelease)    \
    (This)->v -> SetData(This,pformatetc,pmedium,fRelease)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IOleCache_INTERFACE_DEFINED__ */

#ifndef __IOleCache2_INTERFACE_DEFINED__
#define __IOleCache2_INTERFACE_DEFINED__

/* interface IOleCache2 */
/* [unique][uuid][object] */

typedef /* [unique] */ IOleCache2 *POLECACHE2;

EXTERN_C const IID IID_IOleCache2;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000128-0000-0000-C000-000000000046") IOleCache2 : public IOleCache
{
public:
    virtual /* [local] */ CARAPI UpdateCache(
            /* [in] */ PDATAOBJECT pDataObject,
            /* [in] */ UInt32 grfUpdf,
            /* [in] */ PVoid pReserved) = 0;

    virtual CARAPI DiscardCache(
            /* [in] */ UInt32 dwDiscardOptions) = 0;
};

#else

typedef struct IOleCache2Vtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IOleCache2 * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IOleCache2 * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IOleCache2 * This);

        ECode (CARAPICALLTYPE *Cache )(
            IOleCache2 * This,
            /* [unique][in] */ FORMATETC *pformatetc,
            /* [in] */ UInt32 advf,
            /* [out] */ UInt32 *pdwConnection);

        ECode (CARAPICALLTYPE *Uncache )(
            IOleCache2 * This,
            /* [in] */ UInt32 dwConnection);

        ECode (CARAPICALLTYPE *EnumCache )(
            IOleCache2 * This,
            /* [out] */ IEnumSTATDATA **ppenumSTATDATA);

        ECode (CARAPICALLTYPE *InitCache )(
            IOleCache2 * This,
            /* [unique][in] */ IDataObject *pDataObject);

        /* [local] */ ECode (CARAPICALLTYPE *SetData )(
            IOleCache2 * This,
            /* [unique][in] */ FORMATETC *pformatetc,
            /* [unique][in] */ STGMEDIUM *pmedium,
            /* [in] */ Boolean fRelease);

        /* [local] */ ECode (CARAPICALLTYPE *UpdateCache )(
            IOleCache2 * This,
            /* [in] */ PDATAOBJECT pDataObject,
            /* [in] */ UInt32 grfUpdf,
            /* [in] */ PVoid pReserved);

        ECode (CARAPICALLTYPE *DiscardCache )(
            IOleCache2 * This,
            /* [in] */ UInt32 dwDiscardOptions);

    } IOleCache2Vtbl;

interface IOleCache2
    {
        CONST_VTBL struct IOleCache2Vtbl *v;
    };

#ifdef COBJMACROS

#define IOleCache2_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IOleCache2_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IOleCache2_Release(This)    \
    (This)->v -> Release(This)

#define IOleCache2_Cache(This,pformatetc,advf,pdwConnection)    \
    (This)->v -> Cache(This,pformatetc,advf,pdwConnection)

#define IOleCache2_Uncache(This,dwConnection)    \
    (This)->v -> Uncache(This,dwConnection)

#define IOleCache2_EnumCache(This,ppenumSTATDATA)    \
    (This)->v -> EnumCache(This,ppenumSTATDATA)

#define IOleCache2_InitCache(This,pDataObject)    \
    (This)->v -> InitCache(This,pDataObject)

#define IOleCache2_SetData(This,pformatetc,pmedium,fRelease)    \
    (This)->v -> SetData(This,pformatetc,pmedium,fRelease)

#define IOleCache2_UpdateCache(This,pDataObject,grfUpdf,pReserved)    \
    (This)->v -> UpdateCache(This,pDataObject,grfUpdf,pReserved)

#define IOleCache2_DiscardCache(This,dwDiscardOptions)    \
    (This)->v -> DiscardCache(This,dwDiscardOptions)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IOleCache2_INTERFACE_DEFINED__ */

#ifndef __IParseDisplayName_INTERFACE_DEFINED__
#define __IParseDisplayName_INTERFACE_DEFINED__

/* interface IParseDisplayName */
/* [unique][uuid][object] */

typedef /* [unique] */ IParseDisplayName *PPARSEDISPLAYNAME;

EXTERN_C const IID IID_IParseDisplayName;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000011a-0000-0000-C000-000000000046") IParseDisplayName : public IUnknown
{
public:
    virtual CARAPI ParseDisplayName(
            /* [unique][in] */ IBindCtx *pbc,
            /* [in] */ wchar_t* pszDisplayName,
            /* [out] */ UInt32 *pchEaten,
            /* [out] */ IMoniker **ppmkOut) = 0;
};

#else

typedef struct IParseDisplayNameVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IParseDisplayName * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IParseDisplayName * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IParseDisplayName * This);

        ECode (CARAPICALLTYPE *ParseDisplayName )(
            IParseDisplayName * This,
            /* [unique][in] */ IBindCtx *pbc,
            /* [in] */ wchar_t* pszDisplayName,
            /* [out] */ UInt32 *pchEaten,
            /* [out] */ IMoniker **ppmkOut);

    } IParseDisplayNameVtbl;

interface IParseDisplayName
    {
        CONST_VTBL struct IParseDisplayNameVtbl *v;
    };

#ifdef COBJMACROS

#define IParseDisplayName_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IParseDisplayName_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IParseDisplayName_Release(This)    \
    (This)->v -> Release(This)

#define IParseDisplayName_ParseDisplayName(This,pbc,pszDisplayName,pchEaten,ppmkOut)    \
    (This)->v -> ParseDisplayName(This,pbc,pszDisplayName,pchEaten,ppmkOut)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IParseDisplayName_INTERFACE_DEFINED__ */

#ifndef __IOleContainer_INTERFACE_DEFINED__
#define __IOleContainer_INTERFACE_DEFINED__

/* interface IOleContainer */
/* [unique][uuid][object] */

typedef /* [unique] */ IOleContainer *POLECONTAINER;

EXTERN_C const IID IID_IOleContainer;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000011b-0000-0000-C000-000000000046") IOleContainer : public IParseDisplayName
{
public:
    virtual CARAPI EnumObjects(
            /* [in] */ UInt32 grfFlags,
            /* [out] */ IEnumUnknown **ppenum) = 0;

    virtual CARAPI LockContainer(
            /* [in] */ Boolean fLock) = 0;
};

#else

typedef struct IOleContainerVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IOleContainer * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IOleContainer * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IOleContainer * This);

        ECode (CARAPICALLTYPE *ParseDisplayName )(
            IOleContainer * This,
            /* [unique][in] */ IBindCtx *pbc,
            /* [in] */ wchar_t* pszDisplayName,
            /* [out] */ UInt32 *pchEaten,
            /* [out] */ IMoniker **ppmkOut);

        ECode (CARAPICALLTYPE *EnumObjects )(
            IOleContainer * This,
            /* [in] */ UInt32 grfFlags,
            /* [out] */ IEnumUnknown **ppenum);

        ECode (CARAPICALLTYPE *LockContainer )(
            IOleContainer * This,
            /* [in] */ Boolean fLock);

    } IOleContainerVtbl;

interface IOleContainer
    {
        CONST_VTBL struct IOleContainerVtbl *v;
    };

#ifdef COBJMACROS

#define IOleContainer_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IOleContainer_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IOleContainer_Release(This)    \
    (This)->v -> Release(This)

#define IOleContainer_ParseDisplayName(This,pbc,pszDisplayName,pchEaten,ppmkOut)    \
    (This)->v -> ParseDisplayName(This,pbc,pszDisplayName,pchEaten,ppmkOut)

#define IOleContainer_EnumObjects(This,grfFlags,ppenum)    \
    (This)->v -> EnumObjects(This,grfFlags,ppenum)

#define IOleContainer_LockContainer(This,fLock)    \
    (This)->v -> LockContainer(This,fLock)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IOleContainer_INTERFACE_DEFINED__ */

#ifndef __IOleClientSite_INTERFACE_DEFINED__
#define __IOleClientSite_INTERFACE_DEFINED__

/* interface IOleClientSite */
/* [unique][uuid][object] */

typedef /* [unique] */ IOleClientSite *POLECLIENTSITE;

EXTERN_C const IID IID_IOleClientSite;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000118-0000-0000-C000-000000000046") IOleClientSite : public IUnknown
{
public:
    virtual CARAPI SaveObject( void) = 0;

    virtual CARAPI GetMoniker(
            /* [in] */ UInt32 dwAssign,
            /* [in] */ UInt32 dwWhichMoniker,
            /* [out] */ IMoniker **ppmk) = 0;

    virtual CARAPI GetContainer(
            /* [out] */ IOleContainer **ppContainer) = 0;

    virtual CARAPI ShowObject( void) = 0;

    virtual CARAPI OnShowWindow(
            /* [in] */ Boolean fShow) = 0;

    virtual CARAPI RequestNewObjectLayout( void) = 0;
};

#else

typedef struct IOleClientSiteVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IOleClientSite * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IOleClientSite * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IOleClientSite * This);

        ECode (CARAPICALLTYPE *SaveObject )(
            IOleClientSite * This);

        ECode (CARAPICALLTYPE *GetMoniker )(
            IOleClientSite * This,
            /* [in] */ UInt32 dwAssign,
            /* [in] */ UInt32 dwWhichMoniker,
            /* [out] */ IMoniker **ppmk);

        ECode (CARAPICALLTYPE *GetContainer )(
            IOleClientSite * This,
            /* [out] */ IOleContainer **ppContainer);

        ECode (CARAPICALLTYPE *ShowObject )(
            IOleClientSite * This);

        ECode (CARAPICALLTYPE *OnShowWindow )(
            IOleClientSite * This,
            /* [in] */ Boolean fShow);

        ECode (CARAPICALLTYPE *RequestNewObjectLayout )(
            IOleClientSite * This);

    } IOleClientSiteVtbl;

interface IOleClientSite
    {
        CONST_VTBL struct IOleClientSiteVtbl *v;
    };

#ifdef COBJMACROS

#define IOleClientSite_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IOleClientSite_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IOleClientSite_Release(This)    \
    (This)->v -> Release(This)

#define IOleClientSite_SaveObject(This)    \
    (This)->v -> SaveObject(This)

#define IOleClientSite_GetMoniker(This,dwAssign,dwWhichMoniker,ppmk)    \
    (This)->v -> GetMoniker(This,dwAssign,dwWhichMoniker,ppmk)

#define IOleClientSite_GetContainer(This,ppContainer)    \
    (This)->v -> GetContainer(This,ppContainer)

#define IOleClientSite_ShowObject(This)    \
    (This)->v -> ShowObject(This)

#define IOleClientSite_OnShowWindow(This,fShow)    \
    (This)->v -> OnShowWindow(This,fShow)

#define IOleClientSite_RequestNewObjectLayout(This)    \
    (This)->v -> RequestNewObjectLayout(This)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IOleClientSite_INTERFACE_DEFINED__ */

#ifndef __IEnumOLEVERB_INTERFACE_DEFINED__
#define __IEnumOLEVERB_INTERFACE_DEFINED__

/* interface IEnumOLEVERB */
/* [unique][uuid][object] */

typedef /* [unique] */ IEnumOLEVERB *PENUMOLEVERB;

typedef struct  tagOLEVERB
    {
    Int32 lVerb;
    wchar_t* lpszVerbName;
    UInt32 fuFlags;
    UInt32 grfAttribs;
    }    OLEVERB;

typedef struct tagOLEVERB *POLEVERB;

EXTERN_C const IID IID_IEnumOLEVERB;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000104-0000-0000-C000-000000000046") IEnumOLEVERB : public IUnknown
{
public:
    virtual /* [local] */ CARAPI Next(
            /* [in] */ UInt32 celt,
            /* [length_is][size_is][out] */ POLEVERB rgelt,
            /* [out] */ UInt32 *pceltFetched) = 0;

    virtual CARAPI Skip(
            /* [in] */ UInt32 celt) = 0;

    virtual CARAPI Reset( void) = 0;

    virtual CARAPI Clone(
            /* [out] */ IEnumOLEVERB **ppenum) = 0;
};

#else

typedef struct IEnumOLEVERBVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IEnumOLEVERB * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IEnumOLEVERB * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IEnumOLEVERB * This);

        /* [local] */ ECode (CARAPICALLTYPE *Next )(
            IEnumOLEVERB * This,
            /* [in] */ UInt32 celt,
            /* [length_is][size_is][out] */ POLEVERB rgelt,
            /* [out] */ UInt32 *pceltFetched);

        ECode (CARAPICALLTYPE *Skip )(
            IEnumOLEVERB * This,
            /* [in] */ UInt32 celt);

        ECode (CARAPICALLTYPE *Reset )(
            IEnumOLEVERB * This);

        ECode (CARAPICALLTYPE *Clone )(
            IEnumOLEVERB * This,
            /* [out] */ IEnumOLEVERB **ppenum);

    } IEnumOLEVERBVtbl;

interface IEnumOLEVERB
    {
        CONST_VTBL struct IEnumOLEVERBVtbl *v;
    };

#ifdef COBJMACROS

#define IEnumOLEVERB_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IEnumOLEVERB_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IEnumOLEVERB_Release(This)    \
    (This)->v -> Release(This)

#define IEnumOLEVERB_Next(This,celt,rgelt,pceltFetched)    \
    (This)->v -> Next(This,celt,rgelt,pceltFetched)

#define IEnumOLEVERB_Skip(This,celt)    \
    (This)->v -> Skip(This,celt)

#define IEnumOLEVERB_Reset(This)    \
    (This)->v -> Reset(This)

#define IEnumOLEVERB_Clone(This,ppenum)    \
    (This)->v -> Clone(This,ppenum)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IEnumOLEVERB_INTERFACE_DEFINED__ */

#ifndef __IOleObject_INTERFACE_DEFINED__
#define __IOleObject_INTERFACE_DEFINED__

/* interface IOleObject */
/* [unique][uuid][object] */

typedef /* [unique] */ IOleObject *POLEOBJECT;

typedef
enum tagOLEGETMONIKER
    {    OLEGETMONIKER_ONLYIFTHERE = 1,
    OLEGETMONIKER_FORCEASSIGN = 2,
    OLEGETMONIKER_UNASSIGN = 3,
    OLEGETMONIKER_TEMPFORUSER = 4
    }    OLEGETMONIKER;

typedef
enum tagOLEWHICHMK
    {    OLEWHICHMK_CONTAINER = 1,
    OLEWHICHMK_OBJREL = 2,
    OLEWHICHMK_OBJFULL = 3
    }    OLEWHICHMK;

typedef
enum tagOLECLOSE
    {    OLECLOSE_SAVEIFDIRTY = 0,
    OLECLOSE_NOSAVE = 1,
    OLECLOSE_PROMPTSAVE = 2
    }    OLECLOSE;

EXTERN_C const IID IID_IOleObject;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000112-0000-0000-C000-000000000046") IOleObject : public IUnknown
{
public:
    virtual CARAPI SetClientSite(
            /* [unique][in] */ IOleClientSite *pClientSite) = 0;

    virtual CARAPI GetClientSite(
            /* [out] */ IOleClientSite **ppClientSite) = 0;

    virtual CARAPI SetHostNames(
            /* [in] */ wchar_t* szContainerApp,
            /* [unique][in] */ wchar_t* szContainerObj) = 0;

    virtual CARAPI Close(
            /* [in] */ UInt32 dwSaveOption) = 0;

    virtual CARAPI SetMoniker(
            /* [in] */ UInt32 dwWhichMoniker,
            /* [unique][in] */ IMoniker *pmk) = 0;

    virtual CARAPI GetMoniker(
            /* [in] */ UInt32 dwAssign,
            /* [in] */ UInt32 dwWhichMoniker,
            /* [out] */ IMoniker **ppmk) = 0;

    virtual CARAPI InitFromData(
            /* [unique][in] */ IDataObject *pDataObject,
            /* [in] */ Boolean fCreation,
            /* [in] */ UInt32 dwReserved) = 0;

    virtual CARAPI GetClipboardData(
            /* [in] */ UInt32 dwReserved,
            /* [out] */ IDataObject **ppDataObject) = 0;

    virtual /* [local] */ CARAPI DoVerb(
            /* [in] */ Int32 iVerb,
            /* [unique][in] */ LPMSG lpmsg,
            /* [unique][in] */ IOleClientSite *pActiveSite,
            /* [in] */ Int32 lindex,
            /* [in] */ HWND hwndParent,
            /* [unique][in] */ PRECT lprcPosRect) = 0;

    virtual CARAPI EnumVerbs(
            /* [out] */ IEnumOLEVERB **ppEnumOleVerb) = 0;

    virtual CARAPI Update( void) = 0;

    virtual CARAPI IsUpToDate( void) = 0;

    virtual CARAPI GetUseRClassId(
            /* [out] */ CLSID *pClsid) = 0;

    virtual CARAPI GetUserType(
            /* [in] */ UInt32 dwFormOfType,
            /* [out] */ wchar_t* *pszUserType) = 0;

    virtual CARAPI SetExtent(
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ SIZE *psizel) = 0;

    virtual CARAPI GetExtent(
            /* [in] */ UInt32 dwDrawAspect,
            /* [out] */ SIZE *psizel) = 0;

    virtual CARAPI Advise(
            /* [unique][in] */ IAdviseSink *pAdvSink,
            /* [out] */ UInt32 *pdwConnection) = 0;

    virtual CARAPI Unadvise(
            /* [in] */ UInt32 dwConnection) = 0;

    virtual CARAPI EnumAdvise(
            /* [out] */ IEnumSTATDATA **ppenumAdvise) = 0;

    virtual CARAPI GetMiscStatus(
            /* [in] */ UInt32 dwAspect,
            /* [out] */ UInt32 *pdwStatus) = 0;

    virtual CARAPI SetColorScheme(
            /* [in] */ LOGPALETTE *pLogpal) = 0;
};

#else

typedef struct IOleObjectVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IOleObject * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IOleObject * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IOleObject * This);

        ECode (CARAPICALLTYPE *SetClientSite )(
            IOleObject * This,
            /* [unique][in] */ IOleClientSite *pClientSite);

        ECode (CARAPICALLTYPE *GetClientSite )(
            IOleObject * This,
            /* [out] */ IOleClientSite **ppClientSite);

        ECode (CARAPICALLTYPE *SetHostNames )(
            IOleObject * This,
            /* [in] */ wchar_t* szContainerApp,
            /* [unique][in] */ wchar_t* szContainerObj);

        ECode (CARAPICALLTYPE *Close )(
            IOleObject * This,
            /* [in] */ UInt32 dwSaveOption);

        ECode (CARAPICALLTYPE *SetMoniker )(
            IOleObject * This,
            /* [in] */ UInt32 dwWhichMoniker,
            /* [unique][in] */ IMoniker *pmk);

        ECode (CARAPICALLTYPE *GetMoniker )(
            IOleObject * This,
            /* [in] */ UInt32 dwAssign,
            /* [in] */ UInt32 dwWhichMoniker,
            /* [out] */ IMoniker **ppmk);

        ECode (CARAPICALLTYPE *InitFromData )(
            IOleObject * This,
            /* [unique][in] */ IDataObject *pDataObject,
            /* [in] */ Boolean fCreation,
            /* [in] */ UInt32 dwReserved);

        ECode (CARAPICALLTYPE *GetClipboardData )(
            IOleObject * This,
            /* [in] */ UInt32 dwReserved,
            /* [out] */ IDataObject **ppDataObject);

        /* [local] */ ECode (CARAPICALLTYPE *DoVerb )(
            IOleObject * This,
            /* [in] */ Int32 iVerb,
            /* [unique][in] */ LPMSG lpmsg,
            /* [unique][in] */ IOleClientSite *pActiveSite,
            /* [in] */ Int32 lindex,
            /* [in] */ HWND hwndParent,
            /* [unique][in] */ PRECT lprcPosRect);

        ECode (CARAPICALLTYPE *EnumVerbs )(
            IOleObject * This,
            /* [out] */ IEnumOLEVERB **ppEnumOleVerb);

        ECode (CARAPICALLTYPE *Update )(
            IOleObject * This);

        ECode (CARAPICALLTYPE *IsUpToDate )(
            IOleObject * This);

        ECode (CARAPICALLTYPE *GetUseRClassId )(
            IOleObject * This,
            /* [out] */ CLSID *pClsid);

        ECode (CARAPICALLTYPE *GetUserType )(
            IOleObject * This,
            /* [in] */ UInt32 dwFormOfType,
            /* [out] */ wchar_t* *pszUserType);

        ECode (CARAPICALLTYPE *SetExtent )(
            IOleObject * This,
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ SIZE *psizel);

        ECode (CARAPICALLTYPE *GetExtent )(
            IOleObject * This,
            /* [in] */ UInt32 dwDrawAspect,
            /* [out] */ SIZE *psizel);

        ECode (CARAPICALLTYPE *Advise )(
            IOleObject * This,
            /* [unique][in] */ IAdviseSink *pAdvSink,
            /* [out] */ UInt32 *pdwConnection);

        ECode (CARAPICALLTYPE *Unadvise )(
            IOleObject * This,
            /* [in] */ UInt32 dwConnection);

        ECode (CARAPICALLTYPE *EnumAdvise )(
            IOleObject * This,
            /* [out] */ IEnumSTATDATA **ppenumAdvise);

        ECode (CARAPICALLTYPE *GetMiscStatus )(
            IOleObject * This,
            /* [in] */ UInt32 dwAspect,
            /* [out] */ UInt32 *pdwStatus);

        ECode (CARAPICALLTYPE *SetColorScheme )(
            IOleObject * This,
            /* [in] */ LOGPALETTE *pLogpal);

    } IOleObjectVtbl;

interface IOleObject
    {
        CONST_VTBL struct IOleObjectVtbl *v;
    };

#ifdef COBJMACROS

#define IOleObject_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IOleObject_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IOleObject_Release(This)    \
    (This)->v -> Release(This)

#define IOleObject_SetClientSite(This,pClientSite)    \
    (This)->v -> SetClientSite(This,pClientSite)

#define IOleObject_GetClientSite(This,ppClientSite)    \
    (This)->v -> GetClientSite(This,ppClientSite)

#define IOleObject_SetHostNames(This,szContainerApp,szContainerObj)    \
    (This)->v -> SetHostNames(This,szContainerApp,szContainerObj)

#define IOleObject_Close(This,dwSaveOption)    \
    (This)->v -> Close(This,dwSaveOption)

#define IOleObject_SetMoniker(This,dwWhichMoniker,pmk)    \
    (This)->v -> SetMoniker(This,dwWhichMoniker,pmk)

#define IOleObject_GetMoniker(This,dwAssign,dwWhichMoniker,ppmk)    \
    (This)->v -> GetMoniker(This,dwAssign,dwWhichMoniker,ppmk)

#define IOleObject_InitFromData(This,pDataObject,fCreation,dwReserved)    \
    (This)->v -> InitFromData(This,pDataObject,fCreation,dwReserved)

#define IOleObject_GetClipboardData(This,dwReserved,ppDataObject)    \
    (This)->v -> GetClipboardData(This,dwReserved,ppDataObject)

#define IOleObject_DoVerb(This,iVerb,lpmsg,pActiveSite,lindex,hwndParent,lprcPosRect)    \
    (This)->v -> DoVerb(This,iVerb,lpmsg,pActiveSite,lindex,hwndParent,lprcPosRect)

#define IOleObject_EnumVerbs(This,ppEnumOleVerb)    \
    (This)->v -> EnumVerbs(This,ppEnumOleVerb)

#define IOleObject_Update(This)    \
    (This)->v -> Update(This)

#define IOleObject_IsUpToDate(This)    \
    (This)->v -> IsUpToDate(This)

#define IOleObject_GetUseRClassId(This,pClsid)    \
    (This)->v -> GetUseRClassId(This,pClsid)

#define IOleObject_GetUserType(This,dwFormOfType,pszUserType)    \
    (This)->v -> GetUserType(This,dwFormOfType,pszUserType)

#define IOleObject_SetExtent(This,dwDrawAspect,psizel)    \
    (This)->v -> SetExtent(This,dwDrawAspect,psizel)

#define IOleObject_GetExtent(This,dwDrawAspect,psizel)    \
    (This)->v -> GetExtent(This,dwDrawAspect,psizel)

#define IOleObject_Advise(This,pAdvSink,pdwConnection)    \
    (This)->v -> Advise(This,pAdvSink,pdwConnection)

#define IOleObject_Unadvise(This,dwConnection)    \
    (This)->v -> Unadvise(This,dwConnection)

#define IOleObject_EnumAdvise(This,ppenumAdvise)    \
    (This)->v -> EnumAdvise(This,ppenumAdvise)

#define IOleObject_GetMiscStatus(This,dwAspect,pdwStatus)    \
    (This)->v -> GetMiscStatus(This,dwAspect,pdwStatus)

#define IOleObject_SetColorScheme(This,pLogpal)    \
    (This)->v -> SetColorScheme(This,pLogpal)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IOleObject_INTERFACE_DEFINED__ */

#ifndef __IOleWindow_INTERFACE_DEFINED__
#define __IOleWindow_INTERFACE_DEFINED__

/* interface IOleWindow */
/* [unique][uuid][object] */

typedef /* [unique] */ IOleWindow *POLEWINDOW;

EXTERN_C const IID IID_IOleWindow;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000114-0000-0000-C000-000000000046") IOleWindow : public IUnknown
{
public:
    virtual /* [local] */ CARAPI GetWindow(
            /* [out] */ HWND *phwnd) = 0;

    virtual CARAPI ContextSensitiveHelp(
            /* [in] */ Boolean fEnterMode) = 0;
};

#else

typedef struct IOleWindowVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IOleWindow * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IOleWindow * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IOleWindow * This);

        /* [local] */ ECode (CARAPICALLTYPE *GetWindow )(
            IOleWindow * This,
            /* [out] */ HWND *phwnd);

        ECode (CARAPICALLTYPE *ContextSensitiveHelp )(
            IOleWindow * This,
            /* [in] */ Boolean fEnterMode);

    } IOleWindowVtbl;

interface IOleWindow
    {
        CONST_VTBL struct IOleWindowVtbl *v;
    };

#ifdef COBJMACROS

#define IOleWindow_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IOleWindow_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IOleWindow_Release(This)    \
    (This)->v -> Release(This)

#define IOleWindow_GetWindow(This,phwnd)    \
    (This)->v -> GetWindow(This,phwnd)

#define IOleWindow_ContextSensitiveHelp(This,fEnterMode)    \
    (This)->v -> ContextSensitiveHelp(This,fEnterMode)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IOleWindow_INTERFACE_DEFINED__ */

#ifndef __IOleInPlaceUIWindow_INTERFACE_DEFINED__
#define __IOleInPlaceUIWindow_INTERFACE_DEFINED__

/* interface IOleInPlaceUIWindow */
/* [unique][uuid][object] */

typedef /* [unique] */ IOleInPlaceUIWindow *POLEINPLACEUIWINDOW;

typedef RECT BORDERWIDTHS;

typedef PRECT PBORDERWIDTHS;

typedef PCRECT PCBORDERWIDTHS;

EXTERN_C const IID IID_IOleInPlaceUIWindow;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000115-0000-0000-C000-000000000046") IOleInPlaceUIWindow : public IOleWindow
{
public:
    virtual /* [input_sync] */ CARAPI GetBorder(
            /* [out] */ PRECT lprectBorder) = 0;

    virtual /* [input_sync] */ CARAPI RequestBorderSpace(
            /* [unique][in] */ PCBORDERWIDTHS pborderwidths) = 0;

    virtual /* [input_sync] */ CARAPI SetBorderSpace(
            /* [unique][in] */ PCBORDERWIDTHS pborderwidths) = 0;

    virtual CARAPI SetActiveObject(
            /* [unique][in] */ IOleInPlaceActiveObject *pActiveObject,
            /* [unique][string][in] */ const wchar_t* pszObjName) = 0;
};

#else

typedef struct IOleInPlaceUIWindowVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IOleInPlaceUIWindow * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IOleInPlaceUIWindow * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IOleInPlaceUIWindow * This);

        /* [local] */ ECode (CARAPICALLTYPE *GetWindow )(
            IOleInPlaceUIWindow * This,
            /* [out] */ HWND *phwnd);

        ECode (CARAPICALLTYPE *ContextSensitiveHelp )(
            IOleInPlaceUIWindow * This,
            /* [in] */ Boolean fEnterMode);

        /* [input_sync] */ ECode (CARAPICALLTYPE *GetBorder )(
            IOleInPlaceUIWindow * This,
            /* [out] */ PRECT lprectBorder);

        /* [input_sync] */ ECode (CARAPICALLTYPE *RequestBorderSpace )(
            IOleInPlaceUIWindow * This,
            /* [unique][in] */ PCBORDERWIDTHS pborderwidths);

        /* [input_sync] */ ECode (CARAPICALLTYPE *SetBorderSpace )(
            IOleInPlaceUIWindow * This,
            /* [unique][in] */ PCBORDERWIDTHS pborderwidths);

        ECode (CARAPICALLTYPE *SetActiveObject )(
            IOleInPlaceUIWindow * This,
            /* [unique][in] */ IOleInPlaceActiveObject *pActiveObject,
            /* [unique][string][in] */ const wchar_t* pszObjName);

    } IOleInPlaceUIWindowVtbl;

interface IOleInPlaceUIWindow
    {
        CONST_VTBL struct IOleInPlaceUIWindowVtbl *v;
    };

#ifdef COBJMACROS

#define IOleInPlaceUIWindow_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IOleInPlaceUIWindow_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IOleInPlaceUIWindow_Release(This)    \
    (This)->v -> Release(This)

#define IOleInPlaceUIWindow_GetWindow(This,phwnd)    \
    (This)->v -> GetWindow(This,phwnd)

#define IOleInPlaceUIWindow_ContextSensitiveHelp(This,fEnterMode)    \
    (This)->v -> ContextSensitiveHelp(This,fEnterMode)

#define IOleInPlaceUIWindow_GetBorder(This,lprectBorder)    \
    (This)->v -> GetBorder(This,lprectBorder)

#define IOleInPlaceUIWindow_RequestBorderSpace(This,pborderwidths)    \
    (This)->v -> RequestBorderSpace(This,pborderwidths)

#define IOleInPlaceUIWindow_SetBorderSpace(This,pborderwidths)    \
    (This)->v -> SetBorderSpace(This,pborderwidths)

#define IOleInPlaceUIWindow_SetActiveObject(This,pActiveObject,pszObjName)    \
    (This)->v -> SetActiveObject(This,pActiveObject,pszObjName)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IOleInPlaceUIWindow_INTERFACE_DEFINED__ */

#ifndef __IOleInPlaceActiveObject_INTERFACE_DEFINED__
#define __IOleInPlaceActiveObject_INTERFACE_DEFINED__

/* interface IOleInPlaceActiveObject */
/* [uuid][object] */

typedef /* [unique] */ IOleInPlaceActiveObject *POLEINPLACEACTIVEOBJECT;

EXTERN_C const IID IID_IOleInPlaceActiveObject;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000117-0000-0000-C000-000000000046") IOleInPlaceActiveObject : public IOleWindow
{
public:
    virtual /* [local] */ CARAPI TranslateAccelerator(
            /* [in] */ LPMSG lpmsg) = 0;

    virtual /* [input_sync] */ CARAPI OnFrameWindowActivate(
            /* [in] */ Boolean fActivate) = 0;

    virtual /* [input_sync] */ CARAPI OnDocWindowActivate(
            /* [in] */ Boolean fActivate) = 0;

    virtual /* [local] */ CARAPI ResizeBorder(
            /* [in] */ PCRECT prcBorder,
            /* [unique][in] */ IOleInPlaceUIWindow *pUIWindow,
            /* [in] */ Boolean fFrameWindow) = 0;

    virtual CARAPI EnableModeless(
            /* [in] */ Boolean fEnable) = 0;
};

#else

typedef struct IOleInPlaceActiveObjectVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IOleInPlaceActiveObject * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IOleInPlaceActiveObject * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IOleInPlaceActiveObject * This);

        /* [local] */ ECode (CARAPICALLTYPE *GetWindow )(
            IOleInPlaceActiveObject * This,
            /* [out] */ HWND *phwnd);

        ECode (CARAPICALLTYPE *ContextSensitiveHelp )(
            IOleInPlaceActiveObject * This,
            /* [in] */ Boolean fEnterMode);

        /* [local] */ ECode (CARAPICALLTYPE *TranslateAccelerator )(
            IOleInPlaceActiveObject * This,
            /* [in] */ LPMSG lpmsg);

        /* [input_sync] */ ECode (CARAPICALLTYPE *OnFrameWindowActivate )(
            IOleInPlaceActiveObject * This,
            /* [in] */ Boolean fActivate);

        /* [input_sync] */ ECode (CARAPICALLTYPE *OnDocWindowActivate )(
            IOleInPlaceActiveObject * This,
            /* [in] */ Boolean fActivate);

        /* [local] */ ECode (CARAPICALLTYPE *ResizeBorder )(
            IOleInPlaceActiveObject * This,
            /* [in] */ PCRECT prcBorder,
            /* [unique][in] */ IOleInPlaceUIWindow *pUIWindow,
            /* [in] */ Boolean fFrameWindow);

        ECode (CARAPICALLTYPE *EnableModeless )(
            IOleInPlaceActiveObject * This,
            /* [in] */ Boolean fEnable);

    } IOleInPlaceActiveObjectVtbl;

interface IOleInPlaceActiveObject
    {
        CONST_VTBL struct IOleInPlaceActiveObjectVtbl *v;
    };

#ifdef COBJMACROS

#define IOleInPlaceActiveObject_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IOleInPlaceActiveObject_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IOleInPlaceActiveObject_Release(This)    \
    (This)->v -> Release(This)

#define IOleInPlaceActiveObject_GetWindow(This,phwnd)    \
    (This)->v -> GetWindow(This,phwnd)

#define IOleInPlaceActiveObject_ContextSensitiveHelp(This,fEnterMode)    \
    (This)->v -> ContextSensitiveHelp(This,fEnterMode)

#define IOleInPlaceActiveObject_TranslateAccelerator(This,lpmsg)    \
    (This)->v -> TranslateAccelerator(This,lpmsg)

#define IOleInPlaceActiveObject_OnFrameWindowActivate(This,fActivate)    \
    (This)->v -> OnFrameWindowActivate(This,fActivate)

#define IOleInPlaceActiveObject_OnDocWindowActivate(This,fActivate)    \
    (This)->v -> OnDocWindowActivate(This,fActivate)

#define IOleInPlaceActiveObject_ResizeBorder(This,prcBorder,pUIWindow,fFrameWindow)    \
    (This)->v -> ResizeBorder(This,prcBorder,pUIWindow,fFrameWindow)

#define IOleInPlaceActiveObject_EnableModeless(This,fEnable)    \
    (This)->v -> EnableModeless(This,fEnable)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IOleInPlaceActiveObject_INTERFACE_DEFINED__ */

#ifndef __IOleInPlaceFrame_INTERFACE_DEFINED__
#define __IOleInPlaceFrame_INTERFACE_DEFINED__

/* interface IOleInPlaceFrame */
/* [unique][uuid][object] */

typedef /* [unique] */ IOleInPlaceFrame *POLEINPLACEFRAME;

typedef struct  tagOIFI
    {
    UInt32 cb;
    Boolean fMDIApp;
    HWND hwndFrame;
    HACCEL haccel;
    UInt32 cAccelEntries;
    }    OLEINPLACEFRAMEINFO;

typedef struct tagOIFI *POLEINPLACEFRAMEINFO;

typedef struct  tagOleMenuGroupWidths
    {
    Int32 width[ 6 ];
    }    OLEMENUGROUPWIDTHS;

typedef struct tagOleMenuGroupWidths *POLEMENUGROUPWIDTHS;

typedef PVoid HOLEMENU;

EXTERN_C const IID IID_IOleInPlaceFrame;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000116-0000-0000-C000-000000000046") IOleInPlaceFrame : public IOleInPlaceUIWindow
{
public:
    virtual /* [local] */ CARAPI InsertMenus(
            /* [in] */ HMENU hmenuShared,
            /* [out][in] */ POLEMENUGROUPWIDTHS lpMenuWidths) = 0;

    virtual /* [local] */ CARAPI SetMenu(
            /* [in] */ HMENU hmenuShared,
            /* [in] */ HMENU holemenu,
            /* [in] */ HWND hwndActiveObject) = 0;

    virtual /* [input_sync] */ CARAPI SetStatusText(
            /* [unique][in] */ const wchar_t* pszStatusText) = 0;

    virtual CARAPI EnableModeless(
            /* [in] */ Boolean fEnable) = 0;

    virtual /* [local] */ CARAPI TranslateAccelerator(
            /* [in] */ LPMSG lpmsg,
            /* [in] */ UInt16 wID) = 0;
};

#else

typedef struct IOleInPlaceFrameVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IOleInPlaceFrame * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IOleInPlaceFrame * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IOleInPlaceFrame * This);

        /* [local] */ ECode (CARAPICALLTYPE *GetWindow )(
            IOleInPlaceFrame * This,
            /* [out] */ HWND *phwnd);

        ECode (CARAPICALLTYPE *ContextSensitiveHelp )(
            IOleInPlaceFrame * This,
            /* [in] */ Boolean fEnterMode);

        /* [input_sync] */ ECode (CARAPICALLTYPE *GetBorder )(
            IOleInPlaceFrame * This,
            /* [out] */ PRECT lprectBorder);

        /* [input_sync] */ ECode (CARAPICALLTYPE *RequestBorderSpace )(
            IOleInPlaceFrame * This,
            /* [unique][in] */ PCBORDERWIDTHS pborderwidths);

        /* [input_sync] */ ECode (CARAPICALLTYPE *SetBorderSpace )(
            IOleInPlaceFrame * This,
            /* [unique][in] */ PCBORDERWIDTHS pborderwidths);

        ECode (CARAPICALLTYPE *SetActiveObject )(
            IOleInPlaceFrame * This,
            /* [unique][in] */ IOleInPlaceActiveObject *pActiveObject,
            /* [unique][string][in] */ const wchar_t* pszObjName);

        /* [local] */ ECode (CARAPICALLTYPE *InsertMenus )(
            IOleInPlaceFrame * This,
            /* [in] */ HMENU hmenuShared,
            /* [out][in] */ POLEMENUGROUPWIDTHS lpMenuWidths);

        /* [local] */ ECode (CARAPICALLTYPE *SetMenu )(
            IOleInPlaceFrame * This,
            /* [in] */ HMENU hmenuShared,
            /* [in] */ HMENU holemenu,
            /* [in] */ HWND hwndActiveObject);

        /* [input_sync] */ ECode (CARAPICALLTYPE *SetStatusText )(
            IOleInPlaceFrame * This,
            /* [unique][in] */ const wchar_t* pszStatusText);

        ECode (CARAPICALLTYPE *EnableModeless )(
            IOleInPlaceFrame * This,
            /* [in] */ Boolean fEnable);

        /* [local] */ ECode (CARAPICALLTYPE *TranslateAccelerator )(
            IOleInPlaceFrame * This,
            /* [in] */ LPMSG lpmsg,
            /* [in] */ UInt16 wID);

    } IOleInPlaceFrameVtbl;

interface IOleInPlaceFrame
    {
        CONST_VTBL struct IOleInPlaceFrameVtbl *v;
    };

#ifdef COBJMACROS

#define IOleInPlaceFrame_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IOleInPlaceFrame_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IOleInPlaceFrame_Release(This)    \
    (This)->v -> Release(This)

#define IOleInPlaceFrame_GetWindow(This,phwnd)    \
    (This)->v -> GetWindow(This,phwnd)

#define IOleInPlaceFrame_ContextSensitiveHelp(This,fEnterMode)    \
    (This)->v -> ContextSensitiveHelp(This,fEnterMode)

#define IOleInPlaceFrame_GetBorder(This,lprectBorder)    \
    (This)->v -> GetBorder(This,lprectBorder)

#define IOleInPlaceFrame_RequestBorderSpace(This,pborderwidths)    \
    (This)->v -> RequestBorderSpace(This,pborderwidths)

#define IOleInPlaceFrame_SetBorderSpace(This,pborderwidths)    \
    (This)->v -> SetBorderSpace(This,pborderwidths)

#define IOleInPlaceFrame_SetActiveObject(This,pActiveObject,pszObjName)    \
    (This)->v -> SetActiveObject(This,pActiveObject,pszObjName)

#define IOleInPlaceFrame_InsertMenus(This,hmenuShared,lpMenuWidths)    \
    (This)->v -> InsertMenus(This,hmenuShared,lpMenuWidths)

#define IOleInPlaceFrame_SetMenu(This,hmenuShared,holemenu,hwndActiveObject)    \
    (This)->v -> SetMenu(This,hmenuShared,holemenu,hwndActiveObject)

#define IOleInPlaceFrame_SetStatusText(This,pszStatusText)    \
    (This)->v -> SetStatusText(This,pszStatusText)

#define IOleInPlaceFrame_EnableModeless(This,fEnable)    \
    (This)->v -> EnableModeless(This,fEnable)

#define IOleInPlaceFrame_TranslateAccelerator(This,lpmsg,wID)    \
    (This)->v -> TranslateAccelerator(This,lpmsg,wID)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IOleInPlaceFrame_INTERFACE_DEFINED__ */

#ifndef __IOleInPlaceObject_INTERFACE_DEFINED__
#define __IOleInPlaceObject_INTERFACE_DEFINED__

/* interface IOleInPlaceObject */
/* [unique][uuid][object] */

typedef /* [unique] */ IOleInPlaceObject *POLEINPLACEOBJECT;

EXTERN_C const IID IID_IOleInPlaceObject;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000113-0000-0000-C000-000000000046") IOleInPlaceObject : public IOleWindow
{
public:
    virtual CARAPI InPlaceDeactivate( void) = 0;

    virtual CARAPI UIDeactivate( void) = 0;

    virtual /* [input_sync] */ CARAPI SetObjectRects(
            /* [in] */ PCRECT lprcPosRect,
            /* [in] */ PCRECT lprcClipRect) = 0;

    virtual CARAPI ReactivateAndUndo( void) = 0;
};

#else

typedef struct IOleInPlaceObjectVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IOleInPlaceObject * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IOleInPlaceObject * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IOleInPlaceObject * This);

        /* [local] */ ECode (CARAPICALLTYPE *GetWindow )(
            IOleInPlaceObject * This,
            /* [out] */ HWND *phwnd);

        ECode (CARAPICALLTYPE *ContextSensitiveHelp )(
            IOleInPlaceObject * This,
            /* [in] */ Boolean fEnterMode);

        ECode (CARAPICALLTYPE *InPlaceDeactivate )(
            IOleInPlaceObject * This);

        ECode (CARAPICALLTYPE *UIDeactivate )(
            IOleInPlaceObject * This);

        /* [input_sync] */ ECode (CARAPICALLTYPE *SetObjectRects )(
            IOleInPlaceObject * This,
            /* [in] */ PCRECT lprcPosRect,
            /* [in] */ PCRECT lprcClipRect);

        ECode (CARAPICALLTYPE *ReactivateAndUndo )(
            IOleInPlaceObject * This);

    } IOleInPlaceObjectVtbl;

interface IOleInPlaceObject
    {
        CONST_VTBL struct IOleInPlaceObjectVtbl *v;
    };

#ifdef COBJMACROS

#define IOleInPlaceObject_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IOleInPlaceObject_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IOleInPlaceObject_Release(This)    \
    (This)->v -> Release(This)

#define IOleInPlaceObject_GetWindow(This,phwnd)    \
    (This)->v -> GetWindow(This,phwnd)

#define IOleInPlaceObject_ContextSensitiveHelp(This,fEnterMode)    \
    (This)->v -> ContextSensitiveHelp(This,fEnterMode)

#define IOleInPlaceObject_InPlaceDeactivate(This)    \
    (This)->v -> InPlaceDeactivate(This)

#define IOleInPlaceObject_UIDeactivate(This)    \
    (This)->v -> UIDeactivate(This)

#define IOleInPlaceObject_SetObjectRects(This,lprcPosRect,lprcClipRect)    \
    (This)->v -> SetObjectRects(This,lprcPosRect,lprcClipRect)

#define IOleInPlaceObject_ReactivateAndUndo(This)    \
    (This)->v -> ReactivateAndUndo(This)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IOleInPlaceObject_INTERFACE_DEFINED__ */

#ifndef __IOleInPlaceSite_INTERFACE_DEFINED__
#define __IOleInPlaceSite_INTERFACE_DEFINED__

/* interface IOleInPlaceSite */
/* [unique][uuid][object] */

typedef /* [unique] */ IOleInPlaceSite *POLEINPLACESITE;

EXTERN_C const IID IID_IOleInPlaceSite;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000119-0000-0000-C000-000000000046") IOleInPlaceSite : public IOleWindow
{
public:
    virtual CARAPI CanInPlaceActivate( void) = 0;

    virtual CARAPI OnInPlaceActivate( void) = 0;

    virtual CARAPI OnUIActivate( void) = 0;

    virtual /* [local] */ CARAPI GetWindowContext(
            /* [out] */ IOleInPlaceFrame **ppFrame,
            /* [out] */ IOleInPlaceUIWindow **ppDoc,
            /* [out] */ PRECT lprcPosRect,
            /* [out] */ PRECT lprcClipRect,
            /* [out][in] */ POLEINPLACEFRAMEINFO lpFrameInfo) = 0;

    virtual CARAPI Scroll(
            /* [in] */ SIZE scrollExtant) = 0;

    virtual CARAPI OnUIDeactivate(
            /* [in] */ Boolean fUndoable) = 0;

    virtual CARAPI OnInPlaceDeactivate( void) = 0;

    virtual CARAPI DiscardUndoState( void) = 0;

    virtual CARAPI DeactivateAndUndo( void) = 0;

    virtual CARAPI OnPosRectChange(
            /* [in] */ PCRECT lprcPosRect) = 0;
};

#else

typedef struct IOleInPlaceSiteVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IOleInPlaceSite * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IOleInPlaceSite * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IOleInPlaceSite * This);

        /* [local] */ ECode (CARAPICALLTYPE *GetWindow )(
            IOleInPlaceSite * This,
            /* [out] */ HWND *phwnd);

        ECode (CARAPICALLTYPE *ContextSensitiveHelp )(
            IOleInPlaceSite * This,
            /* [in] */ Boolean fEnterMode);

        ECode (CARAPICALLTYPE *CanInPlaceActivate )(
            IOleInPlaceSite * This);

        ECode (CARAPICALLTYPE *OnInPlaceActivate )(
            IOleInPlaceSite * This);

        ECode (CARAPICALLTYPE *OnUIActivate )(
            IOleInPlaceSite * This);

        /* [local] */ ECode (CARAPICALLTYPE *GetWindowContext )(
            IOleInPlaceSite * This,
            /* [out] */ IOleInPlaceFrame **ppFrame,
            /* [out] */ IOleInPlaceUIWindow **ppDoc,
            /* [out] */ PRECT lprcPosRect,
            /* [out] */ PRECT lprcClipRect,
            /* [out][in] */ POLEINPLACEFRAMEINFO lpFrameInfo);

        ECode (CARAPICALLTYPE *Scroll )(
            IOleInPlaceSite * This,
            /* [in] */ SIZE scrollExtant);

        ECode (CARAPICALLTYPE *OnUIDeactivate )(
            IOleInPlaceSite * This,
            /* [in] */ Boolean fUndoable);

        ECode (CARAPICALLTYPE *OnInPlaceDeactivate )(
            IOleInPlaceSite * This);

        ECode (CARAPICALLTYPE *DiscardUndoState )(
            IOleInPlaceSite * This);

        ECode (CARAPICALLTYPE *DeactivateAndUndo )(
            IOleInPlaceSite * This);

        ECode (CARAPICALLTYPE *OnPosRectChange )(
            IOleInPlaceSite * This,
            /* [in] */ PCRECT lprcPosRect);

    } IOleInPlaceSiteVtbl;

interface IOleInPlaceSite
    {
        CONST_VTBL struct IOleInPlaceSiteVtbl *v;
    };

#ifdef COBJMACROS

#define IOleInPlaceSite_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IOleInPlaceSite_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IOleInPlaceSite_Release(This)    \
    (This)->v -> Release(This)

#define IOleInPlaceSite_GetWindow(This,phwnd)    \
    (This)->v -> GetWindow(This,phwnd)

#define IOleInPlaceSite_ContextSensitiveHelp(This,fEnterMode)    \
    (This)->v -> ContextSensitiveHelp(This,fEnterMode)

#define IOleInPlaceSite_CanInPlaceActivate(This)    \
    (This)->v -> CanInPlaceActivate(This)

#define IOleInPlaceSite_OnInPlaceActivate(This)    \
    (This)->v -> OnInPlaceActivate(This)

#define IOleInPlaceSite_OnUIActivate(This)    \
    (This)->v -> OnUIActivate(This)

#define IOleInPlaceSite_GetWindowContext(This,ppFrame,ppDoc,lprcPosRect,lprcClipRect,lpFrameInfo)    \
    (This)->v -> GetWindowContext(This,ppFrame,ppDoc,lprcPosRect,lprcClipRect,lpFrameInfo)

#define IOleInPlaceSite_Scroll(This,scrollExtant)    \
    (This)->v -> Scroll(This,scrollExtant)

#define IOleInPlaceSite_OnUIDeactivate(This,fUndoable)    \
    (This)->v -> OnUIDeactivate(This,fUndoable)

#define IOleInPlaceSite_OnInPlaceDeactivate(This)    \
    (This)->v -> OnInPlaceDeactivate(This)

#define IOleInPlaceSite_DiscardUndoState(This)    \
    (This)->v -> DiscardUndoState(This)

#define IOleInPlaceSite_DeactivateAndUndo(This)    \
    (This)->v -> DeactivateAndUndo(This)

#define IOleInPlaceSite_OnPosRectChange(This,lprcPosRect)    \
    (This)->v -> OnPosRectChange(This,lprcPosRect)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IOleInPlaceSite_INTERFACE_DEFINED__ */

#ifndef __IViewObject_INTERFACE_DEFINED__
#define __IViewObject_INTERFACE_DEFINED__

/* interface IViewObject */
/* [uuid][object] */

typedef /* [unique] */ IViewObject *LPVIEWOBJECT;

typedef /* [unique] */ IViewObject *PVIEWOBJECT;

typedef /* [public] */ struct  DVASPECTINFO
    {
    UInt32 cb;
    UInt32 dwFlags;
    }    DVASPECTINFO;

EXTERN_C const IID IID_IViewObject;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("0000010d-0000-0000-C000-000000000046") IViewObject : public IUnknown
{
public:
    virtual /* [local] */ CARAPI Draw(
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ Int32 lindex,
            /* [in] */ DVASPECTINFO *pvAspect,
            /* [in] */ DVTARGETDEVICE *ptd,
            /* [in] */ HDC hdcTargetDev,
            /* [in] */ HDC hdcDraw,
            /* [in] */ PRECT lprcBounds,
            /* [in] */ PRECT lprcWBounds,
            /* [in] */ Boolean ( STDMETHODCALLTYPE *pfnContinue )(
                UInt32 dwContinue),
            /* [in] */ UInt32 dwContinue) = 0;

    virtual /* [local] */ CARAPI GetColorSet(
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ Int32 lindex,
            /* [unique][in] */ DVASPECTINFO *pvAspect,
            /* [unique][in] */ DVTARGETDEVICE *ptd,
            /* [in] */ HDC hicTargetDev,
            /* [out] */ LOGPALETTE **ppColorSet) = 0;

    virtual /* [local] */ CARAPI Freeze(
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ Int32 lindex,
            /* [unique][in] */ DVASPECTINFO *pvAspect,
            /* [out] */ UInt32 *pdwFreeze) = 0;

    virtual CARAPI Unfreeze(
            /* [in] */ UInt32 dwFreeze) = 0;

    virtual CARAPI SetAdvise(
            /* [in] */ UInt32 aspects,
            /* [in] */ UInt32 advf,
            /* [unique][in] */ IAdviseSink *pAdvSink) = 0;

    virtual /* [local] */ CARAPI GetAdvise(
            /* [out] */ UInt32 *pAspects,
            /* [out] */ UInt32 *pAdvf,
            /* [out] */ IAdviseSink **ppAdvSink) = 0;
};

#else

typedef struct IViewObjectVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IViewObject * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IViewObject * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IViewObject * This);

        /* [local] */ ECode (CARAPICALLTYPE *Draw )(
            IViewObject * This,
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ Int32 lindex,
            /* [in] */ DVASPECTINFO *pvAspect,
            /* [in] */ DVTARGETDEVICE *ptd,
            /* [in] */ HDC hdcTargetDev,
            /* [in] */ HDC hdcDraw,
            /* [in] */ PRECT lprcBounds,
            /* [in] */ PRECT lprcWBounds,
            /* [in] */ Boolean ( STDMETHODCALLTYPE *pfnContinue )(
                UInt32 dwContinue),
            /* [in] */ UInt32 dwContinue);

        /* [local] */ ECode (CARAPICALLTYPE *GetColorSet )(
            IViewObject * This,
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ Int32 lindex,
            /* [unique][in] */ DVASPECTINFO *pvAspect,
            /* [unique][in] */ DVTARGETDEVICE *ptd,
            /* [in] */ HDC hicTargetDev,
            /* [out] */ LOGPALETTE **ppColorSet);

        /* [local] */ ECode (CARAPICALLTYPE *Freeze )(
            IViewObject * This,
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ Int32 lindex,
            /* [unique][in] */ DVASPECTINFO *pvAspect,
            /* [out] */ UInt32 *pdwFreeze);

        ECode (CARAPICALLTYPE *Unfreeze )(
            IViewObject * This,
            /* [in] */ UInt32 dwFreeze);

        ECode (CARAPICALLTYPE *SetAdvise )(
            IViewObject * This,
            /* [in] */ UInt32 aspects,
            /* [in] */ UInt32 advf,
            /* [unique][in] */ IAdviseSink *pAdvSink);

        /* [local] */ ECode (CARAPICALLTYPE *GetAdvise )(
            IViewObject * This,
            /* [out] */ UInt32 *pAspects,
            /* [out] */ UInt32 *pAdvf,
            /* [out] */ IAdviseSink **ppAdvSink);

    } IViewObjectVtbl;

interface IViewObject
    {
        CONST_VTBL struct IViewObjectVtbl *v;
    };

#ifdef COBJMACROS

#define IViewObject_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IViewObject_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IViewObject_Release(This)    \
    (This)->v -> Release(This)

#define IViewObject_Draw(This,dwDrawAspect,lindex,pvAspect,ptd,hdcTargetDev,hdcDraw,lprcBounds,lprcWBounds,pfnContinue,dwContinue)    \
    (This)->v -> Draw(This,dwDrawAspect,lindex,pvAspect,ptd,hdcTargetDev,hdcDraw,lprcBounds,lprcWBounds,pfnContinue,dwContinue)

#define IViewObject_GetColorSet(This,dwDrawAspect,lindex,pvAspect,ptd,hicTargetDev,ppColorSet)    \
    (This)->v -> GetColorSet(This,dwDrawAspect,lindex,pvAspect,ptd,hicTargetDev,ppColorSet)

#define IViewObject_Freeze(This,dwDrawAspect,lindex,pvAspect,pdwFreeze)    \
    (This)->v -> Freeze(This,dwDrawAspect,lindex,pvAspect,pdwFreeze)

#define IViewObject_Unfreeze(This,dwFreeze)    \
    (This)->v -> Unfreeze(This,dwFreeze)

#define IViewObject_SetAdvise(This,aspects,advf,pAdvSink)    \
    (This)->v -> SetAdvise(This,aspects,advf,pAdvSink)

#define IViewObject_GetAdvise(This,pAspects,pAdvf,ppAdvSink)    \
    (This)->v -> GetAdvise(This,pAspects,pAdvf,ppAdvSink)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IViewObject_INTERFACE_DEFINED__ */

#ifndef __IViewObject2_INTERFACE_DEFINED__
#define __IViewObject2_INTERFACE_DEFINED__

/* interface IViewObject2 */
/* [uuid][object] */

typedef /* [unique] */ IViewObject2 *PVIEWOBJECT2;

EXTERN_C const IID IID_IViewObject2;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("00000127-0000-0000-C000-000000000046") IViewObject2 : public IViewObject
{
public:
    virtual CARAPI GetExtent(
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ Int32 lindex,
            /* [unique][in] */ DVTARGETDEVICE *ptd,
            /* [out] */ PSIZE lpsizel) = 0;
};

#else

typedef struct IViewObject2Vtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IViewObject2 * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IViewObject2 * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IViewObject2 * This);

        /* [local] */ ECode (CARAPICALLTYPE *Draw )(
            IViewObject2 * This,
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ Int32 lindex,
            /* [in] */ DVASPECTINFO *pvAspect,
            /* [in] */ DVTARGETDEVICE *ptd,
            /* [in] */ HDC hdcTargetDev,
            /* [in] */ HDC hdcDraw,
            /* [in] */ PRECT lprcBounds,
            /* [in] */ PRECT lprcWBounds,
            /* [in] */ Boolean ( STDMETHODCALLTYPE *pfnContinue )(
                UInt32 dwContinue),
            /* [in] */ UInt32 dwContinue);

        /* [local] */ ECode (CARAPICALLTYPE *GetColorSet )(
            IViewObject2 * This,
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ Int32 lindex,
            /* [unique][in] */ DVASPECTINFO *pvAspect,
            /* [unique][in] */ DVTARGETDEVICE *ptd,
            /* [in] */ HDC hicTargetDev,
            /* [out] */ LOGPALETTE **ppColorSet);

        /* [local] */ ECode (CARAPICALLTYPE *Freeze )(
            IViewObject2 * This,
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ Int32 lindex,
            /* [unique][in] */ DVASPECTINFO *pvAspect,
            /* [out] */ UInt32 *pdwFreeze);

        ECode (CARAPICALLTYPE *Unfreeze )(
            IViewObject2 * This,
            /* [in] */ UInt32 dwFreeze);

        ECode (CARAPICALLTYPE *SetAdvise )(
            IViewObject2 * This,
            /* [in] */ UInt32 aspects,
            /* [in] */ UInt32 advf,
            /* [unique][in] */ IAdviseSink *pAdvSink);

        /* [local] */ ECode (CARAPICALLTYPE *GetAdvise )(
            IViewObject2 * This,
            /* [out] */ UInt32 *pAspects,
            /* [out] */ UInt32 *pAdvf,
            /* [out] */ IAdviseSink **ppAdvSink);

        ECode (CARAPICALLTYPE *GetExtent )(
            IViewObject2 * This,
            /* [in] */ UInt32 dwDrawAspect,
            /* [in] */ Int32 lindex,
            /* [unique][in] */ DVTARGETDEVICE *ptd,
            /* [out] */ PSIZE lpsizel);

    } IViewObject2Vtbl;

interface IViewObject2
    {
        CONST_VTBL struct IViewObject2Vtbl *v;
    };

#ifdef COBJMACROS

#define IViewObject2_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IViewObject2_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IViewObject2_Release(This)    \
    (This)->v -> Release(This)

#define IViewObject2_Draw(This,dwDrawAspect,lindex,pvAspect,ptd,hdcTargetDev,hdcDraw,lprcBounds,lprcWBounds,pfnContinue,dwContinue)    \
    (This)->v -> Draw(This,dwDrawAspect,lindex,pvAspect,ptd,hdcTargetDev,hdcDraw,lprcBounds,lprcWBounds,pfnContinue,dwContinue)

#define IViewObject2_GetColorSet(This,dwDrawAspect,lindex,pvAspect,ptd,hicTargetDev,ppColorSet)    \
    (This)->v -> GetColorSet(This,dwDrawAspect,lindex,pvAspect,ptd,hicTargetDev,ppColorSet)

#define IViewObject2_Freeze(This,dwDrawAspect,lindex,pvAspect,pdwFreeze)    \
    (This)->v -> Freeze(This,dwDrawAspect,lindex,pvAspect,pdwFreeze)

#define IViewObject2_Unfreeze(This,dwFreeze)    \
    (This)->v -> Unfreeze(This,dwFreeze)

#define IViewObject2_SetAdvise(This,aspects,advf,pAdvSink)    \
    (This)->v -> SetAdvise(This,aspects,advf,pAdvSink)

#define IViewObject2_GetAdvise(This,pAspects,pAdvf,ppAdvSink)    \
    (This)->v -> GetAdvise(This,pAspects,pAdvf,ppAdvSink)

#define IViewObject2_GetExtent(This,dwDrawAspect,lindex,ptd,lpsizel)    \
    (This)->v -> GetExtent(This,dwDrawAspect,lindex,ptd,lpsizel)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IViewObject2_INTERFACE_DEFINED__ */

/* Additional Prototypes for ALL interfaces */

/* end of Additional Prototypes */

#ifdef __cplusplus
}
#endif

#endif
